package question7;

import question6.Animal;

/**
 * @FileName Dog
 * @Description
 * @Author Sword
 * @date 2024-10-14
 **/
public class Dog extends Animal {
    public Dog() {
    }

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void run() {
        System.out.println(name + " 在奔跑");
    }

    @Override
    public void speak(){
        System.out.println(name + "狗在说话");
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return this.name;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
